package myjava.exceptions;

import java.io.FileNotFoundException;
import java.io.FileReader;

public class Root3 {

   public static void main(String[] args) {

      Foo o = new Foo();
      try {
         o.m();
      } catch (ClassNotFoundException e) {
         ;
      }
   }
}

class Foo {

   void m() throws ClassNotFoundException {
      
      // both are checked exceptions
      try {
         FileReader f = new FileReader("idontexist.txt");
         // but this doesn't have a match in the catches (only 1 here!)
         // so you need to defined it in the method
         Class t = Class.forName("java.lang.Thread");
      } catch (FileNotFoundException e) {
         ;
      }
   }
}